//
//  FactoryProducer.m
//  AbstractFactory
//
//  Created by flannery on 2018/12/17.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "FactoryProducer.h"
#import "AbstractFactory.h"

@implementation FactoryProducer
+ (AbstractFactory*)getFactory:(NSString *)choice{
    if([choice isEqualToString:@"SHAPE"]) {
        return ShapeFactory.new;
    } else if([choice isEqualToString:@"COLOR"]) {
        return ColorFactory.new;
    }
    return nil;
}
@end
